package com.example.springboot.service;


import com.alibaba.dubbo.config.annotation.Reference;

import com.example.springboot.domain.City;
import org.springframework.stereotype.Component;

/**
 * Created by tang on 2017/12/5.
 */
@Component
public class CityDubboConsumerService {

    @Reference(version = "1.0.0")
    CityDubboService cityDubboService;

    public void printCity() {
        String cityName = "荆州";
        City city = cityDubboService.findCityByName(cityName);
        System.out.println(city.toString());
    }
}
